#!/usr/bin/env python
try:
    import json
except:
    from helper import HelpJson as json
import sys
import class_set
import helper

class UidTimeMapper(helper.MapperHelper):
    def mapper(self):
        for line in sys.stdin:
            key, value = self.loader(line)
            if key != '':
                self.allocator(key, value)

    def loader(self, line):
        uid = ''
        tm = 0
        try:
            line = line.strip()
            node_operator = json.loads(line)
            uid = node_operator["uid"]
            tm = node_operator["addtime"]
        except:
            #print line
            pass
        return (uid, tm)


def main():
    um = UidTimeMapper()
    um.mapper()
   

if __name__ == '__main__':
    main()
